package com.sec.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOpenHelper extends SQLiteOpenHelper{
	
	public DBOpenHelper(Context context) {
		super(context,"sec.db", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE person (personid integer primary key autoincrement, gesturename varchar(50), name varchar(100)  )");
		db.execSQL("CREATE TABLE phone (phoneid integer primary key autoincrement, personid varchar(50), phonetype varchar(20), phone varchar(50),isdefaultphone char(1) )");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		//db.execSQL("ALTER TABLE person ADD amount integer");
	}
	
}
